<?php

include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Controllers.php';
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ValidatorController.php';
include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'AdminModules.php';
include dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . 'lang_vi.php';

class AdminControllers extends Controllers {

    function __construct($aryConfigDB, $aryConfigs) {
        parent::__construct();
        $this->assign('root_page', $this->getRootPage());
        $this->_objConfig = $aryConfigs;
        $this->_objAdminModule = new AdminModules($aryConfigDB);
    }

    function __destruct() {
        
    }

    public function def() {
        $this->manage();
    }

    public function manage() {
        $this->assign('title', 'Trang quản lý');
        $this->setViewTemplate('admin/blackadmin', 'blackadmin-index');
    }

    public function getCustomerRegister() {
        $intOk = $this->_objAdminModule->getCustomerRegister($aryCustomer);
        $this->assign('aryCustomer', $aryCustomer);
        $aryResult = array();
        $aryResult['intOk'] = $intOk;
        $aryResult['content'] = $this->getViewTemplate('admin/blackadmin', 'customer_list_customer');
        echo json_encode($aryResult);
    }

}
?>

